<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- <button id="btn">点我关闭</button> -->
    <script>
        // var time = new Date("2021-1-12 10:10:10")
        // console.log(time)
        var time = new Date()
        // console.log(time)
        // var time = new Date(2022,1,1,1,1,1)
        // console.log(time)
        // var time = new Date()
        var year = time.getTime()
        console.log(year);
        // var time = new Date()
        // var year = time.getFullYear()
        // var month = time.getMonth()
        // var day = time.getDay()
        // var date = time.getDate()
        // var hour = time.getHours()
        // var minutes = time.getMinutes()
        // var second = time.getSeconds()
        // console.log(year,month+1,date,hour,minutes,second)


        // var rem = `<div>
        //     <span>123</span>
        //     </div>`
        //     document.write(rem)

        // function xx(){
        // var time = new Date()
        // var year = time.getFullYear()
        // var month = time.getMonth()
        // var day = time.getDay()
        // var date = time.getDate()
        // var hour = time.getHours()
        // var minute = time.getMinutes()
        // var second = time.getSeconds()
        // var str = `现在时间是${year}年${month}月${day}日${hour}时${minute}分${second}秒`;
        // document.body.innerHTML = str
        // }
        // setInterval(function(){
        //     xx() 
        // }, 1000);
        // var timer = setTimeout(function(){
        //     console.log(1111)
        // }, 5000);
        // document.getElementById("btn").onclick = function(){
        //     clearInterval(timer)
        // }
    </script>
</body>
</html>